GenericStringListDataBrowserSource Class Reference

Generic string list data browser source. More...

Inheritance diagram for GenericStringListDataBrowserSource:
Inheritance graph
[legend]
Collaboration diagram for GenericStringListDataBrowserSource:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { kRowSelected = 1 << 1 }

Public Member Functions

 GenericStringListDataBrowserSource (const std::vector< std::string > *stringList, IGenericStringListDataBrowserSourceSelectionChanged *delegate=0)
 ~GenericStringListDataBrowserSource ()
void setStringList (const std::vector< std::string > *stringList)
const std::vector< std::string > * getStringList () const
void setupUI (const CColor &selectionColor, const CColor &fontColor, const CColor &rowlineColor, const CColor &rowBackColor, const CColor &rowAlteranteBackColor, CFontRef font=0, int32_t rowHeight=-1)
Drag'n Drop Handling



virtual void dbOnDragEnterBrowser (IDataPackage *drag, CDataBrowser *browser)
virtual void dbOnDragExitBrowser (IDataPackage *drag, CDataBrowser *browser)
virtual void dbOnDragEnterCell (int32_t row, int32_t column, const CPoint &where, IDataPackage *drag, CDataBrowser *browser)
virtual void dbOnDragMoveInCell (int32_t row, int32_t column, const CPoint &where, IDataPackage *drag, CDataBrowser *browser)
virtual void dbOnDragExitCell (int32_t row, int32_t column, IDataPackage *drag, CDataBrowser *browser)
virtual bool dbOnDropInCell (int32_t row, int32_t column, const CPoint &where, IDataPackage *drag, CDataBrowser *browser)
Reference Counting Methods



virtual void forget ()
 decrease refcount and delete object if refcount == 0
virtual void remember ()
 increase refcount
virtual int32_t getNbReference () const
 get refcount
Message Methods



virtual CMessageResult notify (CBaseObject *sender, IdStringPtr message)

Protected Member Functions

int32_t dbGetNumRows (CDataBrowser *browser)
 return number of rows for CDataBrowser browser
int32_t dbGetNumColumns (CDataBrowser *browser)
 return number of columns for CDataBrowser browser
bool dbGetColumnDescription (int32_t index, CCoord &minWidth, CCoord &maxWidth, CDataBrowser *browser)
CCoord dbGetCurrentColumnWidth (int32_t index, CDataBrowser *browser)
 return current width of index column
void dbSetCurrentColumnWidth (int32_t index, const CCoord &width, CDataBrowser *browser)
 the width of a column has changed
CCoord dbGetRowHeight (CDataBrowser *browser)
 return height of one row
bool dbGetLineWidthAndColor (CCoord &width, CColor &color, CDataBrowser *browser)
 return the line width and color
void dbDrawHeader (CDrawContext *context, const CRect &size, int32_t column, int32_t flags, CDataBrowser *browser)
 draw the db header
void dbDrawCell (CDrawContext *context, const CRect &size, int32_t row, int32_t column, int32_t flags, CDataBrowser *browser)
CMouseEventResult dbOnMouseDown (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser)
 mouse button was pressed on a cell
CMouseEventResult dbOnMouseMoved (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser)
 mouse was moved over a cell
CMouseEventResult dbOnMouseUp (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser)
void dbSelectionChanged (CDataBrowser *browser)
void dbCellTextChanged (int32_t row, int32_t column, UTF8StringPtr newText, CDataBrowser *browser)
 the text of the cell changed beginTextEdit was called for
void dbCellSetupTextEdit (int32_t row, int32_t column, CTextEdit *textEditControl, CDataBrowser *browser)
 beginTextEdit calls this, so you can setup the textedit control
int32_t dbOnKeyDown (const VstKeyCode &key, CDataBrowser *browser)
void dbAttached (CDataBrowser *browser)
 databrowser view was attached to a parent
void dbRemoved (CDataBrowser *browser)
CMessageResult notify (CBaseObject *sender, IdStringPtr message)

Protected Attributes

const std::vector< std::string > * stringList
int32_t rowHeight
CColor fontColor
CColor selectionColor
CColor rowlineColor
CColor rowBackColor
CColor rowAlternateBackColor
CPoint textInset
CHoriTxtAlign textAlignment
CFontRef drawFont
CDataBrowserdataBrowser
IGenericStringListDataBrowserSourceSelectionChangeddelegate
CVSTGUITimertimer
std::string keyDownFindString

Detailed Description

Generic string list data browser source.


Member Enumeration Documentation

anonymous enum [inherited]
Enumerator:
kRowSelected 

Constructor & Destructor Documentation

GenericStringListDataBrowserSource ( const std::vector< std::string > *  stringList,
IGenericStringListDataBrowserSourceSelectionChanged delegate = 0 
)

Member Function Documentation

void dbAttached ( CDataBrowser browser  )  [protected, virtual]

databrowser view was attached to a parent

Reimplemented from IDataBrowserDelegate.

void dbCellSetupTextEdit ( int32_t  row,
int32_t  column,
CTextEdit textEditControl,
CDataBrowser browser 
) [inline, protected, virtual]

beginTextEdit calls this, so you can setup the textedit control

Reimplemented from IDataBrowserDelegate.

void dbCellTextChanged ( int32_t  row,
int32_t  column,
UTF8StringPtr  newText,
CDataBrowser browser 
) [inline, protected, virtual]

the text of the cell changed beginTextEdit was called for

Reimplemented from IDataBrowserDelegate.

void dbDrawCell ( CDrawContext context,
const CRect size,
int32_t  row,
int32_t  column,
int32_t  flags,
CDataBrowser browser 
) [protected, virtual]

draw a db cell

Implements IDataBrowserDelegate.

void dbDrawHeader ( CDrawContext context,
const CRect size,
int32_t  column,
int32_t  flags,
CDataBrowser browser 
) [protected, virtual]

draw the db header

Implements IDataBrowserDelegate.

bool dbGetColumnDescription ( int32_t  index,
CCoord minWidth,
CCoord maxWidth,
CDataBrowser browser 
) [inline, protected, virtual]

Reimplemented from IDataBrowserDelegate.

CCoord dbGetCurrentColumnWidth ( int32_t  index,
CDataBrowser browser 
) [protected, virtual]

return current width of index column

Implements IDataBrowserDelegate.

bool dbGetLineWidthAndColor ( CCoord width,
CColor color,
CDataBrowser browser 
) [protected, virtual]

return the line width and color

Reimplemented from IDataBrowserDelegate.

int32_t dbGetNumColumns ( CDataBrowser browser  )  [inline, protected, virtual]

return number of columns for CDataBrowser browser

Implements IDataBrowserDelegate.

int32_t dbGetNumRows ( CDataBrowser browser  )  [protected, virtual]

return number of rows for CDataBrowser browser

Implements IDataBrowserDelegate.

CCoord dbGetRowHeight ( CDataBrowser browser  )  [protected, virtual]

return height of one row

Implements IDataBrowserDelegate.

virtual void dbOnDragEnterBrowser ( IDataPackage drag,
CDataBrowser browser 
) [inline, virtual, inherited]
virtual void dbOnDragEnterCell ( int32_t  row,
int32_t  column,
const CPoint where,
IDataPackage drag,
CDataBrowser browser 
) [inline, virtual, inherited]
virtual void dbOnDragExitBrowser ( IDataPackage drag,
CDataBrowser browser 
) [inline, virtual, inherited]
virtual void dbOnDragExitCell ( int32_t  row,
int32_t  column,
IDataPackage drag,
CDataBrowser browser 
) [inline, virtual, inherited]
virtual void dbOnDragMoveInCell ( int32_t  row,
int32_t  column,
const CPoint where,
IDataPackage drag,
CDataBrowser browser 
) [inline, virtual, inherited]
virtual bool dbOnDropInCell ( int32_t  row,
int32_t  column,
const CPoint where,
IDataPackage drag,
CDataBrowser browser 
) [inline, virtual, inherited]
int32_t dbOnKeyDown ( const VstKeyCode key,
CDataBrowser browser 
) [protected, virtual]

Reimplemented from IDataBrowserDelegate.

CMouseEventResult dbOnMouseDown ( const CPoint where,
const CButtonState buttons,
int32_t  row,
int32_t  column,
CDataBrowser browser 
) [inline, protected, virtual]

mouse button was pressed on a cell

Reimplemented from IDataBrowserDelegate.

CMouseEventResult dbOnMouseMoved ( const CPoint where,
const CButtonState buttons,
int32_t  row,
int32_t  column,
CDataBrowser browser 
) [inline, protected, virtual]

mouse was moved over a cell

Reimplemented from IDataBrowserDelegate.

CMouseEventResult dbOnMouseUp ( const CPoint where,
const CButtonState buttons,
int32_t  row,
int32_t  column,
CDataBrowser browser 
) [inline, protected, virtual]

mouse button was released on a cell

Reimplemented from IDataBrowserDelegate.

void dbRemoved ( CDataBrowser browser  )  [protected, virtual]

databrowser view will be removed from its parent

Reimplemented from IDataBrowserDelegate.

void dbSelectionChanged ( CDataBrowser browser  )  [protected, virtual]

the selection of the db changed

Reimplemented from IDataBrowserDelegate.

void dbSetCurrentColumnWidth ( int32_t  index,
const CCoord width,
CDataBrowser browser 
) [inline, protected, virtual]

the width of a column has changed

Reimplemented from IDataBrowserDelegate.

virtual void forget (  )  [inline, virtual, inherited]

decrease refcount and delete object if refcount == 0

virtual int32_t getNbReference (  )  const [inline, virtual, inherited]

get refcount

const std::vector<std::string>* getStringList (  )  const [inline]
virtual CMessageResult notify ( CBaseObject sender,
IdStringPtr  message 
) [inline, virtual, inherited]
CMessageResult notify ( CBaseObject sender,
IdStringPtr  message 
) [protected]
virtual void remember (  )  [inline, virtual, inherited]

increase refcount

void setStringList ( const std::vector< std::string > *  stringList  ) 
void setupUI ( const CColor selectionColor,
const CColor fontColor,
const CColor rowlineColor,
const CColor rowBackColor,
const CColor rowAlteranteBackColor,
CFontRef  font = 0,
int32_t  rowHeight = -1 
)

Member Data Documentation

CDataBrowser* dataBrowser [protected]
CFontRef drawFont [protected]
CColor fontColor [protected]
std::string keyDownFindString [protected]
CColor rowBackColor [protected]
int32_t rowHeight [protected]
CColor rowlineColor [protected]
CColor selectionColor [protected]
const std::vector<std::string>* stringList [protected]
CPoint textInset [protected]
CVSTGUITimer* timer [protected]

The documentation for this class was generated from the following files:

Generated on Fri Nov 22 11:09:32 2013 for VSTGUI by  doxygen 1.6.1